<section class="scrollable padder-md" data-ng-controller="BillEditController">
    <div class="m-b-md">
        <a href="" class="btn btn-rounded  btn-sm btn-icon btn-default pull-right" data-ng-click="close()">
            <i class="fa fa-reply"></i>
        </a>
        <h3 class="m-b-none text-black">
            <i class="fa fa-edit m-r-sm"></i>
            账单- {{bill.id || '新增'}}
        </h3>
    </div>

    <section class="panel panel-default">
        <div class="panel-body">
            <form name="billForm" class="form-horizontal">
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        账单名：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">{{bill.name}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-3 control-label">
                        司机名：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">{{bill.user.nickname}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-3 control-label">
                        状态：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">
                            <span data-ng-if="bill.state == 0" class="badge bg-primary">已创建</span>
                            <span data-ng-if="bill.state == 50" class="badge bg-success">已结算</span>
                        </span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-md-3 control-label">
                        实际金额：
                    </label>
                    <div class="col-md-8 text-danger">
                        <span class="form-control">{{bill.amount}}</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        原来的金额：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">{{bill.originalAmount}}</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        折扣：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">{{bill.discount}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-3 control-label">
                        账单开始时间：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">{{bill.settlementStartTime | date:"yyyy-MM-dd HH:mm:ss"}}</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        账单结束时间：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">{{bill.settlementEndTime | date:"yyyy-MM-dd HH:mm:ss"}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-3 control-label">
                        账单创建时间：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">{{bill.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</span>
                    </div>
                </div>

                <div class="form-group" data-ng-if="bill.state >= 50">
                    <label class="col-md-3 control-label">
                        结算时间：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">{{bill.payTime | date:"yyyy-MM-dd HH:mm:ss"}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-3 control-label">
                        信息行程订单：
                    </label>
                    <div class="col-md-8">
                        <table class="table table-striped b-t b-light">
                            <thead>
                            <tr>
                                <th>订单名</th>
                                <th>订单号</th>
                                <th>状态</th>
                                <th>支付时间</th>
                                <th>实际支付总价</th>
                                <th>折扣</th>
                                <th class="col-md-3">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr data-ng-repeat="order in transactionOrders">
                                <td>{{order.name}}</td>
                                <td>{{order.no}}</td>
                                <td>
                                    <span data-ng-if="order.state == 0" class="badge bg-primary">已创建</span>
                                    <span data-ng-if="order.state == 30" class="badge bg-primary">支付中</span>
                                    <span data-ng-if="order.state == 50" class="badge bg-success">已支付</span>
                                </td>
                                <td>
                                    {{order.payTime|date:"yyyy-MM-dd HH:mm:ss"}}-{{bill.settlementEndTime|date:"yyyy-MM-dd HH:mm:ss"}}
                                </td>
                                <td>{{order.totalPrice}}</td>
                                <td>{{order.discount}}</td>
                                <td>
                                    <a href="javascript:void(0);" class="text-primary m-r-xs" data-ng-click="viewOrder(order.id)"><i class=""></i>查看</a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <!--&lt;!&ndash; 按钮 &ndash;&gt;-->
                <!--<div class="form-group text-right" style="margin-left: 15px; margin-right: 15px;">-->
                    <!--<button type="button" class="btn btn-default" data-ng-click="close()">-->
                        <!--<i class="i i-arrow"></i>-->
                        <!--&nbsp;返回-->
                    <!--</button>-->
                    <!--<button type="submit" class="btn btn-success" data-ng-click="saveObj()">-->
                        <!--<i class="fa fa-save"></i>-->
                        <!--&nbsp;保存-->
                    <!--</button>-->
                <!--</div>-->
            </form>
        </div>
    </section>
</section>
